

angular.module('theApp.routes', [])

.config(['$routeProvider', function($routeProvider) {
    $routeProvider
    
        .when("/"           , {templateUrl: "pages/home.html"})
        .when("/home"       , {templateUrl: "pages/home.html"})
        .when("/help"       , {templateUrl: "pages/help.html"})
        .when("/about"      , {templateUrl: "pages/about.html"})
        .when("/other"      , {templateUrl: "pages/other.html"})
        .when("/error/:id"  , {templateUrl: "pages/error.html", controller: "errorController"})

        .when("/all"            ,   {templateUrl: "pages/view1.html", controller: "allController"})   

        .when("/user/:id"       ,   {templateUrl: "pages/view1.html", controller: "userController"})
        .when("/team/:id"       ,   {templateUrl: "pages/view1.html", controller: "teamController"})
        .when("/request/:id"    ,   {templateUrl: "pages/view1.html", controller: "requestController"})
        .when("/field/:id"      ,   {templateUrl: "pages/view1.html", controller: "fieldController"})

        .when("/create/team/:id"     ,   {templateUrl: "pages/view1.html", controller: "teamControllerCreate"})
        .when("/create/request/:id"  ,   {templateUrl: "pages/view1.html", controller: "requestControllerCreate"})
        .when("/create/field"        ,   {templateUrl: "pages/view1.html", controller: "fieldControllerCreate"})
        .when("/create/user"         ,   {templateUrl: "pages/view1.html", controller: "userControllerCreate"})

        .otherwise({redirectTo: '/error/0'});
}])


;

